'abucomponent.Monkey by Belimoth
Strict
Import abuentity



Class EntityComponent
	Field owner:IEntity
	
	Method Initialize:Void(owner:IEntity)
		Self.owner = owner
	End
	
	Method Finalize:Void()
	
	End
End



Class NullComponent Extends EntityComponent Implements IPosition, ISize, IVelocity, IPhysics, ISprite, IRender, ISchedule		'replace all this with IEntity?
'#Region IPosition
	Method X:Int() Property Return 0 End
	Method X:Void(xNew:Int) Property End
	Method Y:Int() Property Return 0 End
	Method Y:Void(yNew:Int) Property End
	Method Position:Position() Property Return Null End
	Method SetPosition:Void(xNew:Int, yNew:Int) End
	Method DistanceTo:Float(other:IPosition) Return 0 End
	Method AngleTo:Float(other:IPosition)Return 0 End
'#EndRegion 
	
'#Region IVelocity
	Method XVelocity:Float() Property Return 0 End
	Method XVelocity:Void(xVelocityNew:Float) Property End
	Method YVelocity:Float() Property Return 0 End
	Method YVelocity:Void(yVelocityNew:Float) Property End
	Method XAcceleration:Float() Property Return 0 End
	Method XAcceleration:Void(xAccelerationNew:Float) Property End
	Method YAcceleration:Float() Property Return 0 End
	Method YAcceleration:Void(yAccelerationNew:Float) Property End
	Method XMaxVelocity:Float() Property Return 0 End
	Method YMaxVelocity:Float() Property Return 0 End
	Method SetMaxVelocity:Void(xMaxVelocityNew:Float, yMaxVelocityNew:Float) End
	Method XDisplacement:Int() Property Return 0 End
	Method YDisplacement:Int() Property Return 0 End
'#EndRegion 

'#Region ISize
	Method Width:Int() Property Return 0 End
	Method Width:Void(widthNew:Int) Property End
	Method Height:Int() Property Return 0 End
	Method Height:Void(heightNew:Int) Property End
	Method Center:Position() Property Return Null End
	Method Center:Void(position:Position) Property End
	Method SetWidth:Void(widthNew:Int, align:Int = ALIGN_LEFT) End
	Method SetHeight:Void(heightNew:Int, align:Int = ALIGN_TOP) End
	Method SetSize:Void(widthNew:Int, heightNew:Int, align:Int = ALIGN_LEFT|ALIGN_TOP) End
	Method GetEdge:Int(direction:Int) Return 0 End
'#EndRegion 
	
'#Region IPhysics
	Method Solid:Bool() Property Return False End
	Method Solid:Void(solid:Bool) Property End
	Method CollisionGroup:Int() Property Return 0 End
	Method CollisionGroup:Void(group:Int) Property End
	Method CollisionMask:Int() Property Return 0 End
	Method CollisionMask:Void(mask:Int) Property End
	Method Move:Void(x:Int, y:Int) End
	Method IsTouching:Bool(direction:Int) Return False End
	Method OnCollision:Void(other:IEntity) End
'#EndRegion 
	
'#Region ISprite
	Method CurrentAnimation:String() Property Return "" End
	Method NextAnimation:String() Property Return "" End
	Method LoopCount:Int() Property Return 0 End
	Method HandleX:Float() Property Return 0 End
	Method HandleY:Float() Property Return 0 End
	Method SetHandle:Void(x:Float, y:Float) End
	Method AnimationSheet:AbuAnimationSheet() Property Return Null End
	Method AnimationSheet:Void(animationSheet:AbuAnimationSheet) Property End
	Method SetAnimationSheet:Void(path:String, frameWidth:Int, frameHeight:Int) End
	Method SetRate:Void(rate:Float) End
	Method AddAnimation:Void(name:String, sequence:Int[], frameDuration:Int, loop:Bool = True, flipX:Bool = False, flipY:Bool = False) End
	Method AddAnimation:Void(name:String, sequence:Int[], frameDuration:Int[], loop:Bool = True, flipX:Bool = False, flipY:Bool = False) End
	Method AddAnimation:Void(name:String, start:Int, sequence:Int[], frameDuration:Int, loop:Bool = True, flipX:Bool = False, flipY:Bool = False) End
	Method AddAnimation:Void(name:String, start:Int, sequence:Int[], frameDuration:Int[], loop:Bool = True, flipX:Bool = False, flipY:Bool = False) End
	Method AddAnimation:Void(name:String, subAnimations:String[], loop:Bool = True, flipX:Bool = False, flipY:Bool = False) End
	Method PlayAnimation:Void(name:String, rate:Float = 1.0) End
	Method QueueAnimation:Void(name:String, rate:Float = 1.0) End
	Method PlayNextAnimation:Void() End
	Method OnAnimationLoop:Void(animation:String) End
	Method OnAnimationEnd:Void(animation:String) End
	Method AddOffset:Void(name:String, offsetX:Int[], offsetY:Int[], cumulative:Bool = False) End
	Method AddDisplacement:Void(name:String, displaceX:Int[], displaceY:Int[]) End
	Method _Displace:Void(x:Int, y:Int) End
	Method Draw:Void(x:Int, y:Int, rotation:Float = 0, scaleX:Float = 1, scaleY:Float = 1) End
'#EndRegion 
	
'#Region IRender
	Method Visible:Bool() Property Return False End
	Method Visible:Void(visible:Bool) Property End
	Method Alpha:Float() Property Return 0 End
	Method Alpha:Void(alpha:Float)	Property End
	Method ZIndex:Int() Property Return 0 End
	Method ZIndex:Void(zIndex:Int) Property End
	Method Render:Void() End
'#EndRegion 
	
'#Region ISchedule
	Method AddTween:Void(name:String, value:Float, duration:Int, equation:TweenEquationCall = Tween.Linear) End
	Method PauseTween:Void(name:String) End
	Method ResumeTween:Void(name:String) End
	Method RemoveTween:Void(name:String) End
	Method ClearTweens:Void() End
	Method OnTweenComplete:Void(name:String) End
'#EndRegion 
	
End